The CCDAudio class allows to play a CD Rom using MCI.
| Name | Description |
|---|---|
| Constructor | Creates an instance of the CCDAudio class. |
| Name | Description |
|---|---|
| Backward | Moves to the previous track. |
| Close | Closes the device or file and any associated resources. MCI unloads a device when all instances of the device or all files are closed. |
| CloseDoor | Closes the CDRom door. |
| Forward | Moves to the next track. |
| GetAllTracksLength | Returns the total length in seconds of all the tracks. |
| GetAllTracksLengthString | Returns the total length of all the tracks. |
| GetCurrentPos | Returns the current track position in seconds. |
| GetCurrentPosString | Returns the current track position. |
| GetCurrentTrack | Returns the current track number. |
| GetErrorString | Retrieves a string that describes the specified MCI error code. |
| GetLastError | Retrieves a The last MCI error code. |
| GetTrackLength | Returns the length in seconds of the given track. |
| GetTrackLengthString | Returns the length of the given track. |
| GetTracksCount | Returns the count of tracks. |
| GetTrackStartTime | Returns the start time of the given track. |
| GetTrackStartTimeString | Returns the start time of the given track. |
| IsMediaInserted | Checks whether CD media is inserted. |
| IsPaused | Checks whether is in paused mode. |
| IsPlaying | Checks whether is in play mode. |
| IsReady | Checks if the device is ready. |
| IsSeeking | Checks whether is in seeking mode. |
| IsStopped | Checks whether is in stopped mode. |
| Open | Initializes the device. |
| OpenDoor | Opens the CDRom door. |
| Pause | Pauses playing CD Audio. |
| Play | Starts playing CD Audio. |
| PlayFrom | Starts playing CD Audio on the given track. |
| PlayFromTo | Starts playing CD Audio from a given track to a given track. |
| Stop | Stops playing CD Audio. |
| ToEnd | Sets the position to the end of the audio CD. |
| ToStart | Sets the position to the start of the audio CD. |
Creates an instance of the CCDAudio class.
CONSTRUCTOR CCDAudio
DIM pAudio AS CCDAudio
pAudio.Open
pAudio.Play
Moves to the previous track.
FUNCTION Backward () AS BOOLEAN
TRUE or FALSE.
Closes the device or file and any associated resources. MCI unloads a device when all instances of the device or all files are closed.
FUNCTION Close () AS MCIERROR
Returns zero if successful or an error otherwise.
Closes the CDRom door.
FUNCTION CloseDoor () AS MCIERROR
Returns zero if successful or an error otherwise.
Moves to the next track.
FUNCTION Forward () AS BOOLEAN
TRUE or FALSE.
Returns the total length in seconds of all the tracks.
FUNCTION GetAllTracksLength () AS LONG
Returns the total length of all the tracks as a string.
FUNCTION GetAllTracksLengthString () AS CWSTR
Returns the current track position in seconds.
FUNCTION GetCurrentPos () AS LONG
Returns the current track position as a string.
FUNCTION GetCurrentPosString () AS CWSTR
Returns the current track number.
FUNCTION GetCurrentTrack () AS LONG
Retrieves a string that describes the specified MCI error code.
FUNCTION GetErrorString (BYVAL dwError AS MCIERROR = 0) AS CWSTR
| Parameter | Description |
|---|---|
| dwError | Optional. The MCI error code. If this parameter is omitted, the last error code is used. |
Returns the last MCI error code.
FUNCTION GetLastError () AS MCIERROR
Returns the length in seconds of the given track.
FUNCTION GetTrackLength (BYVAL nTrack AS LONG) AS LONG
| Parameter | Description |
|---|---|
| nTrack | The track number. |
Returns the length of the given track as a string.
FUNCTION GetTrackLengthString (BYVAL nTrack AS LONG) AS CWSTR
| Parameter | Description |
|---|---|
| nTrack | The track number. |
Returns the count of tracks.
FUNCTION GetTracksCount () AS LONG
Returns the start time of the given track.
FUNCTION GetTrackStartTime (BYVAL nTrack AS LONG) AS LONG
| Parameter | Description |
|---|---|
| nTrack | The track number. |
Returns the start time of the given track as a string.
FUNCTION GetTrackStartTimeString (BYVAL nTrack AS LONG) AS CWSTR
| Parameter | Description |
|---|---|
| nTrack | The track number. |
Checks whether CD media is inserted.
FUNCTION IsMediaInserted () AS BOOLEAN
TRUE or FALSE.
Checks whether is in paused mode.
FUNCTION IsPaused () AS BOOLEAN
TRUE or FALSE.
Checks whether is in play mode.
FUNCTION IsPlaying () AS BOOLEAN
TRUE or FALSE.
Checks if the device is ready.
FUNCTION IsReady () AS BOOLEAN
TRUE or FALSE.
Checks whether is in seeking mode.
FUNCTION IsSeeking () AS BOOLEAN
TRUE or FALSE.
Checks whether is in stopped mode.
FUNCTION IsStopped () AS BOOLEAN
TRUE or FALSE.
Initializes the device.
FUNCTION Open () AS DWORD
Returns zero if successful or an error otherwise.
Opens the CDRom door.
FUNCTION OpenDoor () AS MCIERROR
Returns zero if successful or an error otherwise.
Pauses playing CD Audio.
FUNCTION Pause () AS MCIERROR
Returns zero if successful or an error otherwise.
Starts playing CD Audio.
FUNCTION Play () AS MCIERROR
Returns zero if successful or an error otherwise.
Starts playing CD Audio on the given track.
FUNCTION PlayFrom (BYVAL nTrack AS LONG) AS MCIERROR
| Parameter | Description |
|---|---|
| nTrack | The track number. |
Returns zero if successful or an error otherwise.
Starts playing CD Audio from a given track to a given track.
FUNCTION PlayFromTo (BYVAL nStartTrack AS LONG, BYVAL nEndTrack AS LONG) AS MCIERROR
| Parameter | Description |
|---|---|
| nStartTrack | The starting track number. |
| nEndTrack | The ending track number. |
Returns zero if successful or an error otherwise.
Stops playing CD Audio.
FUNCTION Stop () AS MCIERROR
Sets the position to the end of the audio CD.
FUNCTION ToEnd () AS MCIERROR
Sets the position to the start of the audio CD.
FUNCTION ToStart () AS MCIERROR